<div class="sidebar_in">
    <?php 
        $sidebar_array = unique_arr($_SESSION['au_menu_list']);
        foreach ($sidebar_array as $key => $val){
            if ($val['pid'] == $_GET['tag']){
    ?>
        <h2 rel="{$val['id']}" class="list_menu_title"><span></span>{$val['title']}</h2>
        <ul rel="{$val['id']}">
    <?php
                foreach($_SESSION['menu'.$_SESSION[C('USER_AUTH_KEY')]] as $a=>$m){
                    if (strtolower($m['name']) != 'public' && strtolower($m['name']) != 'index'){
                        if ($m['group_id'] == $val['id']){
    ?>
            <li rel="{$m.name|strtolower}"><a href="{:U($m["name"].'/index',array('tag'=>$_GET["tag"]))}" id="{$a}"><span></span>{$m.title}</a></li>
    <?php
                        }
                    }
                }
    ?>
        </ul>
    <?php
            }
        }
    ?>
    </div>